Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor building #1332

Merged
merged 87 commits into from
Jan 1, 2020
Merged

Refactor building #1332

merged 87 commits into from
Jan 1, 2020

Conversation

dutor
Copy link
Contributor

@dutor dutor commented Nov 25, 2019

This PR is trying to improve the building experience, by:

  1. Providing third-party/install-cmake.sh to download and install a prebuilt CMake
  2. Providing third-party/build-gcc.sh to automatically download and build GCC 7.5.0
  3. Providing third-party/install-gcc.sh to download and install a prebuilt GCC 7.5.0 according to the current distro and libc
  4. Providing third-party/build-third-party.sh to build and optionally package our third party dependencies
  5. Providing third-party/build-all-third-party.sh to invoke build-third-party.sh using several preset versions of GCC
  6. Providing third-party/install-third-party.sh to download and install a prebuilt third party according to the current version of glibc, GCC(along with its ABI version)
  7. Invoke install-third-party.sh automatically during the configure stage(cmake)

Besides, all installing scripts support an --prefix option to allow one customizing the install location. For the third party installation, works are done to make Bison and krb5 relocatable.

The fresh new building shceme has been tested under various environments:

  1. CentOS 6/7/8
  2. Debian 7/8/9
  3. Ubuntu 16.04/18.04/19.04
  4. GCC 7/8/9, and devtoolset-7 of CentOS 6/7

Since most of these testing are from inside a Docker image, so the Linux Kernel used is nearly the newest one(5.0). There might be other unfound issues.

To try out this PR, run

$ git clone --single-branch --depth=1 --branch refactor-building https://github.com/dutor/nebula.git nebula-refactor-building
$ cd nebula-refactor-building
$ mkdir build && cd build
$ ../third-party/install-cmake.sh             # Can be skipped if you have CMake 3.5.0+
$ source cmake-3.15.5/bin/enable-cmake.sh     # Only necessary if you invoked install-cmake.sh
$ sudo ../third-party/install-gcc.sh          # Can be skipped if you have GCC 7.1.0+
$ source /opt/vesoft/toolset/gcc/7.5.0/enable # Only necessary if you invoked install-gcc.sh
$ cmake ..
$ make

BTW. This PR also fixes #1449
BTW. This PR reduces the build size a lot, as mentioned in #1401

Fixed for CentOS 6

Support to custom download_dir

Added s2geometry

Detect version of cmake

Added build-cmake.sh

Download third-party from oss

Fixed issue due to wget compatibility

Clean build-third-party.sh

Fixed building scripts

Fix building

Fix build-cmake.sh

Fix checksum
CMakeLists.txt Outdated Show resolved Hide resolved
third-party/build-cmake.sh Outdated Show resolved Hide resolved
third-party/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@dangleptr dangleptr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks more clear than before. Great work!

third-party/build-third-party.sh Outdated Show resolved Hide resolved
third-party/build-third-party.sh Show resolved Hide resolved
third-party/externals/autoconf.cmake Show resolved Hide resolved
third-party/externals/autoconf-archive.cmake Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
third-party/build-all-third-party.sh Outdated Show resolved Hide resolved
third-party/build-third-party.sh Outdated Show resolved Hide resolved
third-party/install-third-party.sh Outdated Show resolved Hide resolved
laura-ding
laura-ding previously approved these changes Dec 31, 2019
@dutor dutor added the ready-for-testing PR: ready for the CI test label Jan 1, 2020
@nebula-community-bot
Copy link
Member

Unit testing passed.

@dutor dutor merged commit 875e074 into vesoft-inc:master Jan 1, 2020
@dutor dutor deleted the refactor-building branch January 1, 2020 04:49
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
This PR is trying to improve the building experience, by:
 1. Providing `third-party/install-cmake.sh` to download and install a prebuilt CMake
 2. Providing `third-party/build-gcc.sh` to automatically download and build GCC 7.5.0
 3. Providing `third-party/install-gcc.sh` to download and install a prebuilt GCC 7.5.0 according to the current distro and libc
 4. Providing `third-party/build-third-party.sh` to build and optionally package our third party dependencies
 4. Providing `third-party/build-all-third-party.sh` to invoke `build-third-party.sh` using several preset versions of GCC
 5. Providing `third-party/install-third-party.sh` to download and install a prebuilt third party according to the current version of glibc, GCC(along with its ABI version)
 6. Invoke `install-third-party.sh` automatically during the configure stage(cmake)

Besides, all installing scripts support an `--prefix` option to allow one customizing the install location. For the third party installation, works are done to make *Bison* and *krb5* relocatable.

The fresh new building shceme has been tested under various environments:
 1. CentOS 6/7/8
 2. Debian 7/8/9
 3. Ubuntu 16.04/18.04/19.04
 4. GCC 7/8/9, and devtoolset-7 of CentOS 6/7

Since most of these testing are from inside a Docker image, so the Linux Kernel used is nearly the newest one(5.0). There might be other unfound issues.

To try out this PR, run
```sh
$ git clone --single-branch --depth=1 --branch refactor-building https://github.com/dutor/nebula.git nebula-refactor-building
$ cd nebula-refactor-building
$ mkdir build && cd build
$ ../third-party/install-cmake.sh             # Can be skipped if you have CMake 3.5.0+
$ source cmake-3.15.5/bin/enable-cmake.sh     # Only necessary if you invoked install-cmake.sh
$ sudo ../third-party/install-gcc.sh          # Can be skipped if you have GCC 7.1.0+
$ source /opt/vesoft/toolset/gcc/7.5.0/enable # Only necessary if you invoked install-gcc.sh
$ cmake ..
$ make
```

BTW. This PR also fixes vesoft-inc#1449 
BTW. This PR reduces the build size a lot, as mentioned in vesoft-inc#1401
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Jan 31, 2023
* support_rocksdb_cloud

* clear unused code

* fix cmakelist.txt code format

Co-authored-by: Sophie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

collect2: error: ld returned 1 exit status
7 participants